#include "audiothread.h"

#include <QDebug>
#include <QFile>

#include "ffmpegs.h"

AudioThread::AudioThread(QObject *parent) : QThread(parent) {
    connect(this, &AudioThread::finished, this, &AudioThread::deleteLater);
}

AudioThread::~AudioThread() {
    disconnect();
    requestInterruption();
    quit();
    wait();

    qDebug() << this << "析构了";
}

void AudioThread::run() {

//    AudioEncodeSpec in;
//    in.filename = "/Users/os/Desktop/FFmpegProject/pcm_to_wav/44100_s16le_2.pcm";
//    in.sampleRate = 44100;
//    in.sampleFmt = AV_SAMPLE_FMT_S16;
//    in.chLayout = AV_CH_LAYOUT_STEREO;

//    FFmpegs::aacEncode(in, "/Users/os/Desktop/FFmpegProject/pcm_to_wav/out.aac");

}

